package com.telcordia.cvas.rpn;

public class Factorial {
	public void execute(OperandStack values) {
		int result = 1;

		int operand = values.pop();

		while (operand > 1)
			result *= operand--;

		setXRegister(result);
	}
}
